import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import electron from "vite-plugin-electron";
import * as path from "node:path";

// https://vitejs.dev/config/
export default defineConfig({
	base: './',

	plugins: [vue(), electron({
		vite: {
			base: './',
			plugins: [vue()],
			resolve: {
				alias: {
					'@/': path.resolve(__dirname, 'src') + '/'
				}
			},
			build: {
				rollupOptions: {
					external: [
						'sqlite3',
						'sequelize'
					]
				}
			}
		}
	})],
	resolve: {
		alias: {
			'@/': path.resolve(__dirname, 'src') + '/'
		}
	},
	optimizeDeps: {}
})
